package com.cg.service.impl;

import com.cg.mapper.DemoMapper;
import com.cg.po.Demo;
import com.cg.service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DemoServiceImpl implements DemoService {

    @Autowired
    private DemoMapper demoMapper;


    @Override
    public List<Demo> findAll() {
        return demoMapper.findAll();
    }

    @Override
    public Demo findOneById(Integer id) {
        return demoMapper.findOneById(id);
    }

    @Override
    public void insertDemo(Demo demo) {
        demoMapper.insertDemo(demo);
    }

    @Override
    public void updateDemo(Demo demo) {
        demoMapper.updateDemo(demo);
    }

    @Override
    public void deleteDemo(Long id) {
        demoMapper.deleteDemo(id);
    }
}
